package me.zhengjie.modules.finace_taxation.service;

import me.zhengjie.base.PageInfo;
import me.zhengjie.modules.finace_taxation.domain.FtIndustryDetails;
import me.zhengjie.modules.finace_taxation.domain.FtIndustryDetailsFavorite;
import me.zhengjie.modules.finace_taxation.service.dto.FtIndustryDetailsFavoriteDto;
import me.zhengjie.modules.finace_taxation.service.dto.FtIndustryDetailsFavoriteQueryParam;
import org.springframework.data.domain.Pageable;
import java.util.List;
import java.util.Map;
import java.util.Set;

/**
* @author 杨荣森
* @date 2021-06-23
*/
public interface FtIndustryDetailsFavoriteService {

    static final String CACHE_KEY = "ftIndustryDetailsFavorite";

    /**
    * 查询数据分页
    * @param query 条件
    * @param pageable 分页参数
    * @return PageInfo<FtIndustryDetailsFavoriteDto>
    */
    PageInfo<FtIndustryDetailsFavoriteDto> queryAll(FtIndustryDetailsFavoriteQueryParam query, Pageable pageable);

    /**
    * 查询所有数据不分页
    * @param query 条件参数
    * @return List<FtIndustryDetailsFavoriteDto>
    */
    List<FtIndustryDetailsFavoriteDto> queryAll(FtIndustryDetailsFavoriteQueryParam query);

    FtIndustryDetailsFavorite getById(String id);
    FtIndustryDetailsFavoriteDto findById(String id);

    /**
     * 插入一条新数据。
     */
    int insert(FtIndustryDetailsFavoriteDto resources);
    int updateById(FtIndustryDetailsFavoriteDto resources);
    int removeById(String id);
    int removeByIds(Set<String> ids);

    // 分页查询用户收藏行业动态
    PageInfo<FtIndustryDetails> queryByUserId(Map<String, Object> map);

    /**
    * 导出数据
    * @param all 待导出的数据
    * @param response /
    * @throws IOException /
    */
    // void download(List<FtIndustryDetailsFavoriteDto> all, HttpServletResponse response) throws IOException;

    /*判断是否收藏过改行业详情*/
    int industryFavoriteFlag(FtIndustryDetailsFavoriteDto ftIndustryDetailsFavoriteDto);

    /*取消收藏*/
    int cacelIndustryFavorite(FtIndustryDetailsFavoriteDto ftIndustryDetailsFavoriteDto);

    /*收藏行业详情*/
    int addIndustryFavorite(FtIndustryDetailsFavoriteDto ftIndustryDetailsFavoriteDto);
}
